<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Header.ascx.cs" Inherits="Header" EnableViewState="false" %>

<script type="text/javascript">
function doSearch()
{
    var searchQuery = encodeURI(document.getElementById('query').value);
    if (searchQuery.length > 0) document.location.href = "http://search.canberra.edu.au/search/search.cgi?collection=UCinternal&num_ranks=10&form=subsite&query=" + searchQuery;
    return false;
}
</script>
<div id="header">

    <h1><a href="/">UC Student Personal Management System</a></h1>

    <div id="login_panel">
        <asp:Label ID="UserNameLabel" runat="server" EnableViewState="false" text="" visible="false"></asp:Label>
        <asp:HyperLink ID="AccountLinkButton" Text="My Account" runat="server" navigateUrl="~/ManageAccount.aspx" />
        <asp:HyperLink ID="LoginLinkButton" Text="Log in" runat="server" navigateUrl="~/LoginPage.aspx" /> | 
        <asp:HyperLink ID="LogoutLinkButton" Text="Log out" runat="server" navigateUrl="~/Logout.ashx" />
        <asp:HyperLink ID="StartOverButton" Text="Start Over" runat="server" navigateUrl="~/Logout.ashx" /> | 
        <a id="HelpLink" href="javascript:void(0)" onclick="DropthingsUI.Actions.showHelp()">Help</a>       
    </div>    
    <div id="search_bar">
        <div id="search_bar_wrapper">
            <div id="library_search">
                
                <input id="query" size="40" maxlength="2048" value="" type="text" onkeypress="if( event.keyCode == 13 ) return doSearch(); " />
                <input value="Search" type="button" onclick="return doSearch();" />
            </div>     
        </div>
        
        
    </div>

    <div id="header_message">
        <div id="header_message_wrapper">
            This is an open source Web AJAX Portal built uisng ASP.NET 4.0, It is used for mangement of the UC student's study.
        </div>
    </div>

    <div id="Progress" >
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="10" DynamicLayout="false" >
        <ProgressTemplate><span><img src="indicator.gif" align="middle" alt="Loading..." /></span></ProgressTemplate>
        </asp:UpdateProgress>
    </div>

    <div id="HelpDiv"></div>
</div>


<script type="text/javascript">
document.getElementById('query').focus();
</script>